package com.noble.glamour.module.logic.socket.logic.task;

import android.os.Looper;

import com.noble.glamour.module.logic.socket.logic.KeepAliveSocket;

/**
 * Created by Su on 2018/6/8.
 */
public class SubTread extends Thread {
    public SocketIoHandler handler;
    private KeepAliveSocket client;
    private ThreadRunner runner;

    public SubTread(KeepAliveSocket client, ThreadRunner runner) {
        this.client = client;
        this.runner = runner;
    }

    @Override
    public void run() {
        Looper.prepare();
        handler = new SocketIoHandler(client);

        super.run();
        runner.run();

        Looper.loop();
    }
}
